﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    public class Script : GameScreen
    {
        #region Declarations

        SpriteFont segoe;
        string script;
        Vector2 position;
        string size;

        #endregion

        #region Property

        public String ScriptContent
        {
            set { script = value; }
            get { return script; }
        }
        public Vector2 Position
        {
            set { position = value; }
            get { return position; }
        }

        #endregion

        #region Load

        public Script(string script, int size, Vector2 position)
        {
            this.script = script;
            this.position = position;
            this.size = size.ToString();
        }

        public override void LoadContent(ContentManager content)
        {
            segoe = content.Load<SpriteFont>("Font/Segoe"+size);
        }

        #endregion

        #region Update & Draw

        public override void Update(Touch touch, GameTime gameTime)
        {
            /*foreach (GestureSample gesture in touch.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    ScreenManager.RemoveScreen(this);
                }
            }*/
        }
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            spriteBatch.DrawString(segoe, script, position, Color.Black);
        }

        #endregion

        #region HelperMethods

        public void LeftMove(int size)
        {
            position.X = position.X - size;
        }
        public void RightMove(int size)
        {
            position.X = position.X + size;
        }

        #endregion
    }
}
